﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace ITTestingSystem.Domain.Entities
{
    /// <summary>
    /// Specifies the users entity
    /// </summary>
    /// 
    public class User
    {
        /// <summary>
        /// Unique identifier
        /// </summary>
        /// 
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// First name
        /// </summary>
        /// 
        public string FirstName { get; set; }

        /// <summary>
        /// Last name
        /// </summary>
        /// 
        public string LastName { get; set; }

        /// <summary>
        /// Email
        /// </summary>
        /// 
        [Required]
        public string Email { get; set; }

        /// <summary>
        /// Returns the unique identifier of the users role
        /// </summary>
        /// 
        [Required]
        public int RoleId { get; set; }





        /// <summary>
        /// Returns the authentications descriptions for this user
        /// </summary>
        /// 
        [Required]
        public virtual AuthenticationsDetail AuthenticationsDetail { get; set; }

        /// <summary>
        /// Returns the users role entity
        /// </summary>
        /// 
        public virtual Role Role { get; set; }

        /// <summary>
        /// Returns information about completing the test by different users
        /// </summary>
        /// 
        public virtual ICollection<CompletedTestsDetail> CompletedTestsDetails { get; set; }
    }
}
